package com.chris.springboot.controller;

import com.chris.springboot.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@RestController
public class HelloController {
    @Autowired
    RedisTemplate redisTemplate;
    @Resource
    public RedisUtil redisUtil;
    @GetMapping("/getKey")
    public String redisTest(){
        long y = redisUtil.incr("abc",1);
        return String.valueOf(y);
    }

}
